$execute store result storage dab:system temp.index int 1 run random value 0..$(randomMax)
execute store result score #temp temp run data get storage dab:system temp.index
execute store result storage dab:system temp.index int 1 run scoreboard players remove #temp temp 1
scoreboard players reset #temp temp

function dab:system/mystic_pedestal/random_effect/set with storage dab:system temp